<?php
/**
 * Unfuddle Involvement Model
 * An "involvement" object relates people to projects
 *
 * @package     Unfuddle
 * @subpackage  Data Models
 * @author      Luke Visinoni <luke.visinoni@gmail.com>
 * @copyright   (c) 2010 Luke Visinoni <luke.visinoni@gmail.com>
 * @version     $Id: Involvement.php 27 2011-01-15 10:33:26Z luke.visinoni $
 */
class Unfuddle_Model_Involvement extends Unfuddle_Model_Abstract {

    protected $_name = 'involvement';
    
    protected $_fields = array (
        'created-at' => array('type' => 'datetime', 'required' => false, 'read-only' => true),
        'id' => array('type' => 'integer', 'required' => false, 'read-only' => true),
        /**
         * Within the Involvement model, setting 'is-administrator' to true will
         * make the person a project administrator for the given project.
         */
        'is-administrator' => array('type' => 'boolean', 'required' => false, 'read-only' => false),
        'messages' => array('type' => 'set', 'required' => false, 'read-only' => false, 'set' => array('none', 'read', 'readcreate', 'manage')),
        'milestones' => array('type' => 'set', 'required' => false, 'read-only' => false, 'set' => array('none', 'read', 'manage')),
        'notebooks' => array('type' => 'set', 'required' => false, 'read-only' => false, 'set' => array('none', 'read', 'manage')),
        'people' => array('type' => 'set', 'required' => false, 'read-only' => false, 'set' => array('none', 'read', 'invite', 'manage')),
        'person-id' => array('type' => 'integer', 'required' => false, 'read-only' => false),
        'project-id' => array('type' => 'integer', 'required' => false, 'read-only' => false),
        'source' => array('type' => 'set', 'required' => false, 'read-only' => false, 'set' => array('none', 'read', 'commit')),
        'tickets' => array('type' => 'set', 'required' => false, 'read-only' => false, 'set' => array('none', 'read', 'create', 'readcreate', 'manage')),
        'updated-at' => array('type' => 'datetime', 'required' => false, 'read-only' => true),
    );

}